home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.sprintlink.net!news1!MAUI
- From: jeffl@inter-intelli.com (Jeff Lindholm)
- Subject: Re: Stupid Q: what's wrong?
- X-Nntp-Posting-Host: inter6.inter-intelli.com
- Message-ID: <DM1wpD.Lqp@iquest.net>
- To: paveltka@unix.infoserve.net
- Sender: news@iquest.net (News Admin)
- Organization: Interactive Intelligence, Inc.
- X-Newsreader: News Xpress Version 1.0 Beta #3
- References: <4ejerd$r84@news.infoserve.net>
- Date: Wed, 31 Jan 1996 18:07:04 GMT
-
- char c;
- c = *ptr;
- strcat(szC,&c); // will start at address of c and move until it hits a '\0'
- in memory somewhere
-
- That will most likely step on the stack. By throwing in a cout << you are
- pushing the stack around. If you really need to do the above try.
-
- char c[2];
- c[1] = '\0';
- .
- other code
- .
- *c = *ptr;
- strcat(sz, c);
-